var express = require('express');
var router = express.Router();
const userService = require("../src/services/user/userServices")

/* GET users listing. */
router.post('/login', async function(req, resp) {
       let {username,pwd} = req.body;
      let res=  await userService.login(username,pwd);
      console.log(res);
      if (res == null) {
            resp.json({"code":0,"msg":"登录失败"})
      }else{
            resp.json({"code":1,"msg":"登录成功"})
      }
});
module.exports = router;
